package com.hamu.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.groups.Default;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class Tag {
    @NotNull(groups = Update.class)
    private Integer tagId; // 主键ID
    @NotEmpty
    private String tagName; // 标签名称
    private Integer createUser; // 创建人ID
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdTime; // 创建时间
    private Long articleCount;
    // 验证分组
    public interface Add extends Default {}
    public interface Update extends Default {}
}